package net.citrite.android;


public class Severity {
    public static Severity WARNING = new Severity("warning", 1);
    public static Severity ERROR = new Severity("error", 2);
    public static Severity None = new Severity("none", 0);
    private String label;
    private int value;

    public Severity(String label, int value) {
        this.label = label;
        this.value = value;
    }

    @Override
    public String toString() {
        return this.label;
    }

    @Override
    public int hashCode() {
        return this.value;
    }

    @Override
    public boolean equals(Object obj) {
        Severity severity = (Severity)obj;
        if (severity.value == this.value) {
            return true;
        }
        return false;
    }
}
